# reduce 函数
# reduce(function, sequence, initial=None)
# reduce(func, [1, 2, 3]) = func(func(1, 2), 3)
from functools import reduce

# def func(x, y):
#     return x * y
#
#
# print(reduce(func, [1, 2, 3, 4]))

print(reduce(lambda x, y: x * y, [1, 2, 3, 4]))
